<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Exercicio 03</title>
</head>
<body>
		<%
			String valor = request.getParameter("valor");
				if (valor != null) {
					int numero = Integer.parseInt(valor);
					List<Integer> divisores = new ArrayList<Integer>();
					for (int i = 1; i <= numero; i++) {
						if (numero % i == 0) {
							divisores.add(i);
						}
					}
					out.println("<h1> Divisorores de: "+ valor +"</h1></br>");
					for(Integer divisor: divisores){
					out.println("<h3>"+divisor+"</h3></br>");
					}

				}
		%>
</body>
</html>